package com.jiangyg.mall.cart.config;

import com.jiangyg.mall.cart.interceptor.CartInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 类描述：购物车 Web 服务配置
 *
 * @author jiangyg
 * @version 4.0
 * @date 2022-12-07
 */
@Configuration
public class CartWebConfiguration implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new CartInterceptor()).addPathPatterns("/**");
    }

}
